<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page isELIgnored="false"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<html>
  <head>
  <%
  String[] table={"userName","userPassword"};
  Object list = request.getAttribute("list");
  String str = (String)request.getAttribute("addAcount");
  if(str!= null && str.equals("addAcount"))
  {
  %>
  <font color = "blue">增加用戶成功</font>
  <%
  }
   %> 
  </head>
  
  <body>
  <center>
   <h1>All the message of the Users</h1>
   <hr>
   <form action="<%=basePath %>/account.do?oper=addAllAccount " method="post">
   用戶名：<input type = "text" name = "accountEntity.dutyMan">&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
   密碼：<input type = "text" name = "accountEntity.dutypwd">
   <input type = "submit" value = "增加用戶">
   </form>
		<table border="1" cellpadding="0" cellspacing="0" >
		<tr>
		<c:forEach var="name" items="<%=table %>">
			<td width ='260px'>${name }</td>
		</c:forEach>
		</tr>
			<c:forEach var="accountEntity" items="${list}">
				<tr>
				<td width ='260px'>${accountEntity.dutyMan }</td>
				<td width ='260px'>${accountEntity.dutypwd }</td>
				<td><a href="<%=basePath %>account.do?oper=delAccount&dutyMan=${accountEntity.dutyMan }">Delete</a></td>
				</tr>
			</c:forEach>
		</table>    
		<a href = "<%=basePath %>/login.jsp">返回登陆界面</a>
		</center>
  </body>
</html>
